<template>
  <h2>计算属性-computed-setup属性</h2>
  <input type="text" v-model="firstname" /> +
  <input type="text" v-model="lastname" />
  <p>{{ fullname }}</p>
</template>

<script setup>
import { ref, computed } from "vue";

const firstname = ref("zhang");
const lastname = ref("san");

const fullname = computed(() => {
  return firstname.value + lastname.value;
});
</script>
